//ToolKit.java
package bridge.sample.menupeer;

/**
 * Menu factory
 *@author:youtubezou
 *@version:2012-7-27
 */
public class ToolKit {
	public MenuPeer getMenuBar(String osName){
		if("Unix".equals(osName)){
			return new UnixMenuBar();
		}
		
		if("Windows".equals(osName)){
			return new WinMenuBar();
		}
		
		return null;
	}

	public MenuPeer getPopupMenu(String osName) {
		if("Unix".equals(osName)){
			return new UnixPopupMenu();
		}
		
		if("Windows".equals(osName)){
			return new WinPopupMenu();
		}
		return null;
	}

}
